<template>
  <div id="app">
      <div class="main">

          <!-- 顶部组件 -->
          <header-nav v-if="$route.meta.headerNav"></header-nav>  

          <!-- 路由视图 -->
          <router-view 
            @get-player-id="getPlayerId"
            @get-play-all-id="getPlayAllId"
            ></router-view>

          <!-- 播放音乐 -->
<<<<<<< HEAD
          <player @get-player-id="getPlayerId" v-if="playerId" :player-id="playerId" :list-id="listId" v-show="$route.meta.player"></player>
      </div>
  </div>
</template>

=======
          <player @get-player-id="getPlayerId" v-show="playerId" :player-id="playerId" :list-id="listId"></player>
        

      </div>
  </div>
</template>

>>>>>>> 1be25bcaec70de7af34416996b7bf8d1733aff08
<script>
import headerNav from "./components/base/headerNav.vue"
import player from "./components/base/player.vue"
  export default {
      data() {
        return {
          playerId:null,
          listId:null
        }
      },
      components:{
        headerNav,
        player
      },
      created(){
        // console.log(this)
      },
      methods:{
        getPlayerId(id){
          // console.log("歌曲id：",id);
          this.playerId = id;
        },
        getPlayAllId(id){
          this.listId = id;
        }
      }
  }
</script>

<style lang="less">
@import "./assets/css/base.css";

</style>